-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix database migration issue with different database models #20214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Generated by 🚫 dangerJS |
You can test the changes in Jetpack from this Pull Request by:
|
| } | ||
|
|
||
| guard let metadata = try? NSPersistentStoreCoordinator.metadataForPersistentStore(ofType: NSSQLiteStoreType, at: storeURL), | ||
| !objectModel.isConfiguration(withName: nil, compatibleWithStoreMetadata: metadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♂️ I mis-translated this line in #19770. Thanks for fixing this up. But I'm surprised the issue wasn't caught by the migration unit tests 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, thank you for the quick response @crazytonyli ! I was just about to ping you to confirm if this change was intended.
|
👋👋 @hypest This PR was targeting the |
|
Thanks for the information @mokagio , makes sense to me too 👍 I wonder if we can also try to keep the attribution as close as (practically) possible to what happened. For example, I think I'd wish to see this fix and PR created by Chris to be merged and see its way to production. I know of course that the commits are keeping their attribution when cherry-picked, but I wonder if we can opt for PR-level attribution too. I cannot be fully sure about the practicality of the following: to rebase the base branch onto whichever is the desired one, and force push. Can that keep the work in the single PR? No strong feelings. |
|
You raise an interesting point on attribution 🤔
I can see this working, yes. The only downside I can think of is that a rebase rewrites history so anyone who wishes to interact with the branch afterwards would have to reset. But... I don't think it's a big deal in the case of a hotfix, because the PR would be most likely merged shortly after. |
Nice, thanks for giving it a try @mokagio ! As I mentioned earlier, no strong feelings from my side so, if we see signs of adverse effects let's switch to the previous practice. |
Partially fixes #20207
Description
WordPress-iOS/WordPress/Classes/Utility/ContextManager.m
Line 219 in 24db036
Testing
To test:
WP -> JP Migration fix
release/21.7.1branchissue/20207-fix-model-jp-migrationApp upgrade
release/21.7.1branchissue/20207-fix-model-jp-migrationRegression Notes
Potential unintended areas of impact
Potentially with the existing manual model migration functions
What I did to test those areas of impact (or what existing automated tests I relied on)
Manually testing the app upgrade scenario and comparing code to older working code
What automated tests I added (or what prevented me from doing so)
N/A
PR submission checklist:
RELEASE-NOTES.txtif necessary.